3.4.43 \(\int \sqrt {a+a \cos (c+d x)} \sqrt {\sec (c+d x)} \, dx\) [343]

Optimal. Leaf size=57 \[ \frac {2 \sqrt {a} \text {ArcSin}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{d} \]

[Out]

2*arcsin(sin(d*x+c)*a^(1/2)/(a+a*cos(d*x+c))^(1/2))*a^(1/2)*cos(d*x+c)^(1/2)*sec(d*x+c)^(1/2)/d

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 57, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 25, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {4307, 2853, 222} \begin {gather*} \frac {2 \sqrt {a} \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)} \text {ArcSin}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a + a*Cos[c + d*x]]*Sqrt[Sec[c + d*x]],x]

[Out]

(2*Sqrt[a]*ArcSin[(Sqrt[a]*Sin[c + d*x])/Sqrt[a + a*Cos[c + d*x]]]*Sqrt[Cos[c + d*x]]*Sqrt[Sec[c + d*x]])/d

Rule 222

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSin[Rt[-b, 2]*(x/Sqrt[a])]/Rt[-b, 2], x] /; FreeQ[{a, b}
, x] && GtQ[a, 0] && NegQ[b]

Rule 2853

Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]/Sqrt[(d_.)*sin[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[-2/f, Su
bst[Int[1/Sqrt[1 - x^2/a], x], x, b*(Cos[e + f*x]/Sqrt[a + b*Sin[e + f*x]])], x] /; FreeQ[{a, b, d, e, f}, x]
&& EqQ[a^2 - b^2, 0] && EqQ[d, a/b]

Rule 4307

Int[(csc[(a_.) + (b_.)*(x_)]*(c_.))^(m_.)*(u_), x_Symbol] :> Dist[(c*Csc[a + b*x])^m*(c*Sin[a + b*x])^m, Int[A
ctivateTrig[u]/(c*Sin[a + b*x])^m, x], x] /; FreeQ[{a, b, c, m}, x] &&  !IntegerQ[m] && KnownSineIntegrandQ[u,
 x]

Rubi steps

\begin {align*} \int \sqrt {a+a \cos (c+d x)} \sqrt {\sec (c+d x)} \, dx &=\left (\sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \int \frac {\sqrt {a+a \cos (c+d x)}}{\sqrt {\cos (c+d x)}} \, dx\\ &=-\frac {\left (2 \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a}}} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}\\ &=\frac {2 \sqrt {a} \sin ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right ) \sqrt {\cos (c+d x)} \sqrt {\sec (c+d x)}}{d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 70, normalized size = 1.23 \begin {gather*} \frac {\sqrt {2} \text {ArcSin}\left (\sqrt {2} \sin \left (\frac {1}{2} (c+d x)\right )\right ) \sqrt {\cos (c+d x)} \sqrt {a (1+\cos (c+d x))} \sec \left (\frac {1}{2} (c+d x)\right ) \sqrt {\sec (c+d x)}}{d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a + a*Cos[c + d*x]]*Sqrt[Sec[c + d*x]],x]

[Out]

(Sqrt[2]*ArcSin[Sqrt[2]*Sin[(c + d*x)/2]]*Sqrt[Cos[c + d*x]]*Sqrt[a*(1 + Cos[c + d*x])]*Sec[(c + d*x)/2]*Sqrt[
Sec[c + d*x]])/d

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(99\) vs. \(2(47)=94\).
time = 0.27, size = 100, normalized size = 1.75

method result size
default \(-\frac {2 \sqrt {\frac {1}{\cos \left (d x +c \right )}}\, \sqrt {a \left (1+\cos \left (d x +c \right )\right )}\, \arctan \left (\frac {\sin \left (d x +c \right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}}{\cos \left (d x +c \right )}\right ) \sqrt {\frac {\cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \left (\cos ^{2}\left (d x +c \right )-1\right )}{d \sin \left (d x +c \right )^{2}}\) \(100\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2),x,method=_RETURNVERBOSE)

[Out]

-2/d*(1/cos(d*x+c))^(1/2)*(a*(1+cos(d*x+c)))^(1/2)*arctan(sin(d*x+c)*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)/cos(d*x
+c))*(cos(d*x+c)/(1+cos(d*x+c)))^(1/2)/sin(d*x+c)^2*(cos(d*x+c)^2-1)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 146 vs. \(2 (47) = 94\).
time = 0.59, size = 146, normalized size = 2.56 \begin {gather*} \frac {\sqrt {a} \arctan \left ({\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \sin \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \sin \left (d x + c\right ), {\left (\cos \left (2 \, d x + 2 \, c\right )^{2} + \sin \left (2 \, d x + 2 \, c\right )^{2} + 2 \, \cos \left (2 \, d x + 2 \, c\right ) + 1\right )}^{\frac {1}{4}} \cos \left (\frac {1}{2} \, \arctan \left (\sin \left (2 \, d x + 2 \, c\right ), \cos \left (2 \, d x + 2 \, c\right ) + 1\right )\right ) + \cos \left (d x + c\right )\right )}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2),x, algorithm="maxima")

[Out]

sqrt(a)*arctan2((cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2*c) + 1)^(1/4)*sin(1/2*arctan2(sin(2
*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + sin(d*x + c), (cos(2*d*x + 2*c)^2 + sin(2*d*x + 2*c)^2 + 2*cos(2*d*x + 2
*c) + 1)^(1/4)*cos(1/2*arctan2(sin(2*d*x + 2*c), cos(2*d*x + 2*c) + 1)) + cos(d*x + c))/d

________________________________________________________________________________________

Fricas [A]
time = 0.41, size = 119, normalized size = 2.09 \begin {gather*} \left [\frac {\sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {-a} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right )}{d}, -\frac {2 \, \sqrt {a} \arctan \left (\frac {\sqrt {a \cos \left (d x + c\right ) + a} \sqrt {\cos \left (d x + c\right )}}{\sqrt {a} \sin \left (d x + c\right )}\right )}{d}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2),x, algorithm="fricas")

[Out]

[sqrt(-a)*log((2*a*cos(d*x + c)^2 - 2*sqrt(a*cos(d*x + c) + a)*sqrt(-a)*sqrt(cos(d*x + c))*sin(d*x + c) + a*co
s(d*x + c) - a)/(cos(d*x + c) + 1))/d, -2*sqrt(a)*arctan(sqrt(a*cos(d*x + c) + a)*sqrt(cos(d*x + c))/(sqrt(a)*
sin(d*x + c)))/d]

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )} \sqrt {\sec {\left (c + d x \right )}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**(1/2)*(a+a*cos(d*x+c))**(1/2),x)

[Out]

Integral(sqrt(a*(cos(c + d*x) + 1))*sqrt(sec(c + d*x)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^(1/2)*(a+a*cos(d*x+c))^(1/2),x, algorithm="giac")

[Out]

integrate(sqrt(a*cos(d*x + c) + a)*sqrt(sec(d*x + c)), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \sqrt {\frac {1}{\cos \left (c+d\,x\right )}}\,\sqrt {a+a\,\cos \left (c+d\,x\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1/cos(c + d*x))^(1/2)*(a + a*cos(c + d*x))^(1/2),x)

[Out]

int((1/cos(c + d*x))^(1/2)*(a + a*cos(c + d*x))^(1/2), x)

________________________________________________________________________________________